package ylsb.controller;


import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import ylsb.service.DictShiyongyuanzeService;
import ylsb.service.XiangmuleixingService;
import ylsb.support.JsonResult;

import javax.annotation.Resource;

@RestController
@RequestMapping("dict_shiyongyuanze")
public class DictShiyongyuanzeController {
    @Resource
    DictShiyongyuanzeService ddService;

    @RequestMapping("find_all")
    public JsonResult<?> findAll(
            @RequestParam("text") String ppText
    ){
        try {
            return JsonResult.getSuccessResult(ddService.findAll("%"+ppText+"%"));
        }catch(Exception e) {
            e.printStackTrace();
            return JsonResult.getErrorResult("查询失败！"+e);
        }
    }


}
